package com.example.test.gridview;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class FunnyLookingAdapter extends ArrayAdapter<String> {
	Context context;
	private String[] WORLDCUP2010;

	public FunnyLookingAdapter(Context context, int textViewResourceId,
			String[] WORLDCUP2010) {
		super(context, textViewResourceId, WORLDCUP2010);
		this.context = context;
		this.WORLDCUP2010 = WORLDCUP2010;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		TextView label = (TextView) convertView;

		if (convertView == null) {
			convertView = new TextView(context);
			label = (TextView) convertView;
		}

		label.setText(WORLDCUP2010[position]);

		return (convertView);
	}
}